//
//  LMBaseViewManager.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 HZMengLiao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ReactiveObjC.h"

//#import "ZHRoomOpenSubViewDelegate.h"
//#import "ZHRoomSubViewEventDelegate.h"


typedef NS_ENUM(NSUInteger, ContentAppearFrom) {
    ContentAppearFrom_Bottom,
    ContentAppearFrom_Center,
    ContentAppearFrom_Top,
//    ContentAppearFrom_Right,
//    ContentAppearFrom_Left,
};

typedef NS_ENUM(NSUInteger, ContentAppearTo) {
    ContentAppearTo_Top,
    ContentAppearTo_Bottom,
    ContentAppearTo_Center,
    
//    ContentAppearTo_Right,
//    ContentAppearTo_Left,
};

typedef NS_ENUM(NSUInteger, ContentCloseTo) {
    ContentCloseTo_Bottom,
    ContentCloseTo_Right,
    ContentCloseTo_Top,
    ContentCloseTo_Left,
    ContentCloseTo_Center,
    
    ContentCloseTo_CurrentPosition,
};

NS_ASSUME_NONNULL_BEGIN

@interface THLiveRoomBasePopView : UIView


//@property (nonatomic, weak) id<ZHRoomOpenSubViewDelegate> openSubViewDelegate;
//@property (nonatomic, weak) id<ZHRoomSubViewEventDelegate> subViewEventDelegate;
/// 默认是(0,0,0,0) 给个关闭的位置
@property (nonatomic, assign) CGRect closeToFrame;
/// 关闭视图是从父视图删掉, 默认YES
@property (nonatomic, assign) BOOL removeWhenClosed;
/// 出现动画时间
@property (nonatomic, assign) CGFloat appearAnimationTime;
/// 关闭动画时间
@property (nonatomic, assign) CGFloat closeAnimationTime;
/**需要展示的内容视图 */
@property (nonatomic, strong) UIView *contentView;
/** 遮罩层透明度  默认0*/
@property (nonatomic, assign) CGFloat masklyerAlpha;
/**遮罩层是否可点击 关闭视图 默认YES*/
@property (nonatomic, assign, getter=isCanClose) BOOL canClose;
/**
 视图关闭之后事件,用于当前视图关闭之后通知其他视图干的事情
 无论手动调用close关闭,还是点击空白背景关闭都会发送这个sub
 */
@property (nonatomic, strong) RACSubject *afterCloseSub;

/// 重设弹窗的默认值
- (void)restPopViewInitialValue;
/// 添加子视图
- (void)setupUI;
/// 约束子视图
- (void)setupFrames;
/**
 //默认从底部出现 滑动到底部
  @param done 回调
 */
- (void)showContentViewDone:(nullable void(^)(void))done;
/**
 滑出视图
 @param fromWhere 从哪里来
 void @param toWhere 到哪里去
 @param done 回调
 */
- (void)showContentViewFrom:(ContentAppearFrom)fromWhere to:(ContentAppearTo)toWhere done:(void(^)(void))done;
/**
 隐藏当前视图的动画
 @param done 回调
 */
- (void)closeContentViewDone:(nullable void(^)(void))done;

/**
 隐藏当前视图不带动画
 */
- (void)closeContentViewWithOutAnimation;

/**
 隐藏当前视图的动画
 @param toWhere 往哪个方向隐藏
 @param done 回调
 */
- (void)closeContentViewToWhere:(ContentCloseTo)toWhere Done:(nullable void (^)(void))done;

@end

NS_ASSUME_NONNULL_END
